﻿@{
    ViewBag.Title = "工伤事故台账";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section scripts{
        <script src="~/Areas/Senv/ViewModels/Senv.com.js"></script>
        <script src="~/Areas/Senv/ViewModels/Senv.viewModel.search.js"></script>
        <script type="text/javascript">
        var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
        var viewModel = function(){ 
            var self = this;
            Senv.viewModel.search.apply(this,arguments);
        }
        ko.bindingViewModel(new viewModel(data));

        </script>
}
        <div class="z-toolbar">
            <a id="a_refresh" href="#" plain="true" class="easyui-linkbutton" icon="icon-arrow_refresh" title="刷新" data-bind="click:refreshClick">刷新</a>
            <a id="a_add"    href="#" plain="true" class="easyui-linkbutton" icon="icon-add" title="新增" data-bind="click:addClick">新增</a>
            <a id="a_edit"   href="#" plain="true" class="easyui-linkbutton" icon="icon-edit" data-bind="click:editClick" title="编辑">编辑</a>
            <a id="a_del"    href="#" plain="true" class="easyui-linkbutton" icon="icon-cross" title="删除" data-bind="click:deleteClick">删除</a>
            <a id="a_audit"  href="#" plain="true" class="easyui-linkbutton" icon="icon-user-accept" data-bind="click:auditClick" title="确认">确认</a>
            <a id="a_export" href="#" class="easyui-splitbutton" data-options="menu:'#dropdown',iconCls:'icon-download'">导出</a>
        </div>

        <div id="dropdown" style="width:100px; display:none;">  
            <div data-options="iconCls:'icon-ext-xls'"      suffix="xls"    data-bind="click:downloadClick">Excel2003   </div>  
            <div data-options="iconCls:'icon-page_excel'"   suffix="xlsx"   data-bind="click:downloadClick">Excel2007   </div>  
            <div data-options="iconCls:'icon-ext-doc'"      suffix="doc"    data-bind="click:downloadClick">Word2003    </div>  
        </div> 

      <div id="condition" class="container_12" style="position: relative;">
            <div class="grid_1 lbl">人员名称</div>
            <div class="grid_2 val"><input type="text" data-bind="value:form.Gssgtz_Rymc" class="z-txt"/></div>
            <div class="grid_1 lbl">事故名称</div>
            <div class="grid_2 val"><input type="text" data-bind="value:form.Gssgtz_Sgmc" class="z-txt"/></div>
            <div class="clear"></div>
       
            <div class="grid_1 lbl">发生日期</div>
            <div class="grid_2 val"><input type="text" data-bind="value:form.Gssgtz_Fsrq" class="z-txt easyui-daterange"/></div>
            <div class="clear"></div>

          <div class="prefix_9" style="position:absolute;top:5px;height:0;">  
                <a id="a_search" href="#" class="button button-blue" style="margin:0 15px;" data-bind="click:searchClick">查询</a> 
                <a id="a_reset" href="#" class="button button-blue" data-bind="click:clearClick">清空</a>
            </div>
        </div>

        <table id="gridlist" data-bind="datagrid:grid">
             <thead>  
                <tr>  
                    <th field="Gssgtz_BillNo" hidden="false"   sortable="true" align="left"    width="100" >事故编号</th>  
                    <th field="Gssgtz_Fsrq"   sortable="true" align="center"  width="80" formatter="com.formatDate">发生日期</th>  
                    <th field="Gssgtz_Sgmc"   sortable="true" align="left"    width="100">事故名称</th>  
                    <th field="Gssgtz_Rybh"   sortable="true" align="left"    width="80" >人员编号</th> 
                    <th field="Gssgtz_Rymc"   sortable="true" align="left"    width="80" >人员名称</th> 
                    <th field="Gssgtz_Bmmc"    sortable="true" align="center"  width="140" >所属单位</th> 
                    <th field="Gssgtz_Csrq"   sortable="true" align="center"  width="80" formatter="com.formatDate">出生日期</th>  
                    <th field="Gssgtz_Sglb"   sortable="true" align="left"    width="80"  >事故类别</th>  
                    <th field="Gssgtz_Shbw"   sortable="true" align="left"    width="80"  >伤害部位</th>  
                    <th field="Gssgtz_Shcd"   sortable="true" align="left"    width="80"  >伤害程度</th>  
                    <th field="Gssgtz_Sgyy"   sortable="true" align="left"    width="120" >事故原因</th>  
                    <th field="CreatePerson"  sortable="true" align="center"  width="80"  >创建人</th>  
                    <th field="CreateDate"    sortable="true" align="center"  width="80" formatter="com.formatDate">创建日期</th>   
                    <th field="UpdatePerson"  sortable="true" align="center"  width="80"  >修改人</th>  
                    <th field="UpdateDate"    sortable="true" align="center"  width="80" formatter="com.formatDate">修改日期</th>   
                </tr>                            
            </thead>      
        </table> 


